<?php
$v_record_code = "";
if(isset($_REQUEST['hdn_code'])){
	$v_record_code = _replace_bad_char($_REQUEST['hdn_code']);
}
if(_is_sqlserver()){//CSDL MSSQL 
	// Lay noi dung cua mot ho so
	$sql = "Exec Onegate_RecordGetSingleByCode " ;
	$sql = $sql."'". $v_record_code ."'";
	$ado_conn->SetFetchMode(ADODB_FETCH_ASSOC);
	$arr_single_record = $ado_conn->GetRow($sql); 
	$v_error = _replace_bad_char(trim($arr_single_record['RET_ERROR'])); 
}
sleep(0);
if (!is_null($v_error) && $v_error<>""){?>
	<script>
		alert("<?php echo $v_error; ?>");
		if (_MODAL_DIALOG_MODE==1){
			window.location = "<?php echo $v_goto_url; ?>";
		}else{
			window.history.back();
		}	
	</script><?php
	exit;
}
?>